package com.googlecode.restitory.gae;

import org.junit.After;
import org.junit.Before;

import com.googlecode.restitory.gae.RequestService;
import com.googlecode.restitory.gae.hook.DefaultRequestService;

public class AbstractTestCase {

	protected GAETestHelper helper;

	protected RequestService service;
	
	protected RequestAdapter adapter;

	@Before
	public void setUp() throws Exception {
		helper = new GAETestHelper();
		helper.prepareLocalServiceTestHelper();
		helper.bootLocalServiceTestHelper();

		service = new DefaultRequestService();
		adapter = new RequestAdapter(service);
	}

	@After
	public void tearDown() {
		if (helper != null) {
			helper.shutdownLocalServiceTestHelper();
		}
	}

}
